package exception;

import java.io.FileOutputStream;

public class AutoCloseableDemo1 {
    public static void main(String[] args) {
        try(
                FileOutputStream fos = new FileOutputStream("lee.txt");
                ) {
            fos.write(1);
        }catch (Exception e){
            e.printStackTrace();
        }
        System.out.println("自动关流");
    }
}
